package br.com.mestrefamiliar.mestres;

import java.util.List;

import br.com.mestrefamiliar.util.DAOFactory;

public class MestresRN {
	
	public MestresDAO mestresDAO;
	
	public MestresRN(){
		this.mestresDAO = DAOFactory.criarMestresDAO();
	}
	
	public Mestres carregar(Integer codigo){
		return this.mestresDAO.carregar(codigo);
	}
	
	public void salvar(Mestres mestre){
		this.mestresDAO.salvar(mestre);
	}
	
	public void deletar(Mestres mestre){
		this.mestresDAO.excluir(mestre);
	}
	
	public List<Mestres> listar(){
		return this.mestresDAO.lista();
	}

}
